import React, {PureComponent, Fragment} from 'react';
import Info from './Info';
import List from './List';
import {connect} from 'dva';


@connect(({car_reserve, loading}) => ({
  car_reserve,
  loading: loading.models.car_reserve,
}))
class BasicList extends PureComponent {
  constructor(props) {
    super(props);
    this.permissions = JSON.parse(sessionStorage.getItem('permissions'));
    this.state = {
    };
  }


  render() {
    const that=this;
    const {
      car_reserve: {detail},
    } = this.props;
    return <Fragment>
      {
        detail.isDetail?<Info />: <List />
      }
    </Fragment>
  }
}

export default BasicList;
